System Addressing

This section covers the following topics:

Address Configuration

Addresses are generated by the CPU or an I/O device on the PCI or ISA bus. A CPU generated address could be targeted at System Memory, PCI memory, PCI I/O or ISA space. Similarly, an I/O device's address could be to select System Memory or other PCI or ISA devices. Since the addressing capabilities of CPU and I/O devices are different, a scheme to map them to the appropriate target address space is required.

From the CPU’s perspective the PCI I/O and memory space are linear and byte accessible. Since the Alpha 21264 processor supports byte mode accesses, we can default to a single linear I/O space.

The PCI host controller in the P-Chip does not recognize I/O space accesses directed at it from other PCI or ISA devices.

The TIG Address is sparse in that each aligned 64 byte region has only 1 byte of information.


CPU Address Map

CPU address space is defined as the map of the CPU generated addresses to access System Memory and I/O, and is shown in the following table.

SPACESIZECPUAddr[43:0]Notes
System Memory 2 GB 000 0000 0000
000 FFFF FFFF
Cacheable, Pre-fetchable.
Reserved 8188 GB 001 0000 0000
7FF FFFF FFFF
 
P-Chip0 PCI Memory 4 GB 800 0000 0000
800 FFFF FFFF
Linear Addressing, Non-Cacheable.
TIG BUS 1 GB 801 0000 0000
801 3FFF FFFF
addr[5:0]=0. 1 byte/64bytes. Effective space is 16 MB.
Reserved 1 GB 801 4000 0000
801 7FFF FFFF
 
P-Chip0 CSR’s 256 MB 801 8000 0000
801 8FFF FFFF
addr[5:0]=0. Quadword access only.
Reserved 256 MB 801 9000 0000
801 9FFF FFFF
 
C-Chip CSR’s 256 MB 801 A000 0000
801 AFFF FFFF
addr[5:0]=0. Quadword access only. Non-cacheable.
D-Chip CSR’s 256 MB 801 B000 0000
801 BFFF FFFF
addr[5:0]=0. Each byte per quadword points at 1 of 8 D-Chips. All bytes must be identical. Non-cacheable
Reserved 896 MB 801 C000 0000
801 F7FF FFFF
 
P-Chip 0 PCI IACK/Special 64 MB 801 FC00 0000
801 FBFF FFFF
Linear addressing, No address extension using HAE
P-Chip 0 PCI I/O 32 MB 801 FC00 0000
801 FDFF FFFF
Linear addressing. No HAE. Non- cacheable.
P-Chip 0 PCI Configuration 16 MB 801 FE00 0000
801 FEFF FFFF
Linear addressing. No HAE. Non- cacheable.
Reserved 16 MB 801 FF00 0000
801 FFFF FFFF
 
P-Chip1 PCI Memory 4 GB 802 0000 0000
802 FFFF FFFF
Linear addressing,. Non-cacheable.
Reserved 2 GB 803 0000 0000
803 7FFF FFFF
 
P-Chip 1 CSR’s 256 MB 803 8000 0000
803 8FFF FFFF
Linear addressing, No HAE. Non- cacheable.
Reserved 1664 MB 803 9000 0000
803 F7FF FFFF
 
P-Chip1 PCI IACK/Special 64 MB 803 F800 0000
803 FBFF FFFF
Linear addressing, No HAE. Non- cacheable.
P-Chip 1 PCI I/O 32 MB 803 FC00 0000
803 FDFF FFFF
Linear addressing. No HAE. Non- cacheable.
P-Chip 1 Configuration 16 MB 803 FE00 0000
803 FEFF FFFF
Linear addressing. No HAE. Non cacheable.
Reserved 8188 GB 804 0000 0000
FFF FFFF FFFF
 


CPU to PCI Address Translation

The following figure illustrates how a CPU address mapping to PCI memory space gets translated into a PCI Memory address. The CPU address and byte mask are provided by the Alpha 21264 processor. The translation occurs in the C-Chip.
cpupci

The table referenced in the figure to translate the CPU Mask into PCI AD[1:0] and PCI BE[3:0] follows.

Type MaskPCI_AD[2:0]
64-bit
PCI_BE[7:0]
64-bit
PCI_AD[2:0]
32-bit
PCI_BE[3:0]
32-bit
Byte 0000 0001
000
1111 1110
000
1110
Byte 0000 0010
001
1111 1101
001
1101
Byte 0000 0100
010
1111 1011
010
1011
Byte 0000 1000
011
1111 0111
011
0111
Byte 0001 0000
100
1110 1111
100
1110
Byte 0010 0000
101
1101 1111
101
1101
Byte 0100 0000
110
1011 1111
110
1011
Byte 1000 0000
111
0111 1111
111
0111
Word 0000 0011
000
1111 1100
000
1100
Word 0000 1100
010
1111 0011
010
0011
Word 0011 0000
100
1100 1111
100
1100
Word 1100 0000
110
0011 1111
110
0011
LW xxxx xxx1
000
xxxx 0000
000
0000
LW xxxx xx10
100
0000 1111
100
0000
LW xxxx x100
000
xxxx 0000
000
0000
LW xxxx 1000
100
0000 1111
100
0000
LW xxx1 0000
000
1111 0000
000
0000
LW xx10 0000
100
0000 1111
100
0000
LW x100 0000
000
1111 0000
000
0000
LW 1000 0000
100
0000 1111
100
0000
QW xxxx xxxx
000
0000 0000
000
0000


CPU to PCI I/O Space Address Translation

The following figure illustrates how a CPU address mapping to PCI I/O space gets translated into a PCI address.
pciio


PCI Configuration Space 0 Mapping

The following figure illustrates the translation from CPU address space to PCI Configuration Space 0.
pci0

The table referenced in figure to translate CPU Mask into PCI AD[1:0] and PCI BE[3:0] follows.

The decoding of the 5-bit Device # field in CPU Address to generate the field IDSEL[20:0] in PCI AD[31:11] is straightforward. The Device field is binary encoded with 00000 setting IDSEL[0] (which is PCI AD[11]), 00001 setting IDSEL[1] (PCI AD[12]) and so on up to 10100 setting IDSEL[20] (PCI AD[31]). Device field encodings 10101-11111 are unused and result in IDSEL[20:0] being all 0’s.

TypeMaskPCI AD[2]PCI BE[3:0]
Byte 0000 0001
0
1110
Byte 0000 0010
0
1101
Byte 0000 0100
0
1011
Byte 0000 1000
0
0111
Byte 0001 0000
1
1110
Byte 0010 0000
1
1101
Byte 0100 0000
1
1011
Byte 1000 0000
1
0111
Word 0000 0011
0
1100
Word 0000 1100
0
0011
Word 0011 0000
1
1100
Word 1100 0000
1
0011
LW xxxx xxx1
0
0000
LW xxxx xx10
1
0000
LW xxxx x100
0
0000
LW xxxx 1000
1
0000
LW xxx1 0000
0
0000
LW xx10 0000
1
0000
LW x100 0000
0
0000
LW 1000 0000
1
0000
QW xxxx xxxx
0
0000


PCI Configuration Space 1 Mapping

The following figure shows how this mapping is done. The table referenced in the figure is shown above in PCI Space 0 Mapping.
pci0


TIG Address Space Translation

The following figure illustrates the TIG Address Mapping scheme.
pci0


PCI DMA Address Translation

Both PCI-0 and PCI-1 have identical translation mechanisms located in P-Chip0 and P-Chip1 respectively. DMA Address translation refers to taking a PCI device generated PCI memory address and mapping that into System Memory address.

The P-Chips ignore the following PCI commands from a PCI device:

The P-Chips will respond to PCI memory read/write and invalidates if the PCI address maps to System Memory.

Each P-Chip supports 4 DMA address windows and 1 DMA Monster window. Each of the normal DMA windows are capable of mapping to system memory or to other PCI assuming another P-Chip exists. Assuming the window selected by the PCI address is not a Peer-to-Peer window, it can translate the incoming address to the System Memory address in 2 ways, as follow.

  1. Direct Mapped: The incoming address is compared against Window Base Address register and a Window Mask register which determines the size of the window. If the address falls in this window, the address bits that are not part of the compare are concatenated to a Translated Base address register to form the System Memory Address. Note that the PCI Address bits that are not part of the compare are the lower order bits and represent the size of the window.
    System Address[34:2] = T_Base[34:20+n]:PCI_AD[19+n:2]
    where n varies from 0-11. This means that size of the window can vary from 1 MB to 2 GB.

  2. Scatter/Gather Mapping: This scheme also uses the Window Base, Window Mask and Translated Base Address Registers. The difference is that the translated address from the scheme for direct mapping results in a quadword address into a System Memory based page table which produces a Page Table Entry (PTE). The PTE produces the top 21 bits of the System memory address while the PCI AD[12:0] are sent through untranslated as the Page Offset. The translation is illustrated in the following figure.
pci0
V is the valid bit in the PTE and must be a 1 for the PTE to be used. Each P-Chip caches a number of PTE’s in a S/G TLB to avoid the memory fetch on every DMA transaction. The page size is fixed at 8KB. The window size determines the size of the Page Table for a given window. This in turn determines the number of bits used from the Translated Base Address[34:10] and the PCI AD[31:13].
PTE Address[34:3] = T_Base[34:10+n]:PCI_AD[19+n:13]
where n varies from 0-11. This results in window size range from 1MB - 2 GB.


Monster Window

This window is used only with PCI Dual Address Cycle. A Monster window is selected if the PCI AD[63:40] = 0x0000_01 (bit 40 alone is a 1). In this case the low order PCI AD [34:0] are used untranslated to address System Memory.